<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp" %>
<html>
<head>
    <title>技师技能类型管理</title>
    <meta name="decorator" content="default"/>
    <script type="text/javascript">
        $(document).ready(function () {

        });
        function page(n, s) {
            $("#pageNo").val(n);
            $("#pageSize").val(s);
            $("#searchForm").submit();
            return false;
        }
        function selectType(type) {
            var mjsType = '${types.get("MJS")}';
            var mrsType = '${types.get("MRS")}';
            switch (String(type)) {
                case mjsType:
                    $("#type").val(mjsType);
                    break;
                case mrsType:
                    $("#type").val(mrsType);
                    break;
            }
        }
    </script>
</head>
<body>
<ul class="nav nav-tabs">
    <li class="active"><a href="${ctx}/meibanguserskillstype/meibangUserSkillsType/">技师技能类型列表</a>
    </li>
    <li><a href="${ctx}/meibanguserskillstype/meibangUserSkillsType/form">技师技能类型添加</a></li>
</ul>
<form:form id="searchForm" modelAttribute="meibangUserSkillsType"
           action="${ctx}/meibanguserskillstype/meibangUserSkillsType/" method="post"
           class="breadcrumb form-search">
    <input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
    <input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
    <ul class="ul-form">
            <%--<li><label>类别：</label>
                <form:select path="type" class="input-medium">
                    <form:options items="${types}" itemLabel="label" itemValue="code"
                                  htmlEscape="false"/>
                </form:select>
            </li>--%>
            <%--<li><label>技师：</label>
                <sys:treeselect id="user" name="user.id" value="${meibangUserSkillsType.user.id}" labelName="user.name" labelValue="${meibangUserSkillsType.user.name}"
                    title="用户" url="/sys/user/treeData?type=3" cssClass="input-small" allowClear="true" notAllowSelectParent="true"/>
            </li>--%>
        <form:hidden path="type"/>
      
        <li><label>美甲师等级：</label>
            <form:select path="level" class="input-medium">
                <%--onchange='selectType(${types.get("MJS")})'>--%>
                <form:options items="${mjsLevel}" itemLabel="label" itemValue="code"
                              htmlEscape="false"/>
            </form:select>
        </li>
        <li><label>美容师等级：</label>
            <form:select path="level1" class="input-medium">
                <%--onchange='selectType(${types.get("MRS")})'>--%>
                <form:options items="${mrsLevel}" itemLabel="label" itemValue="code"
                              htmlEscape="false"/>
            </form:select>
        </li>
        <li class="btns"><input id="btnSubmit" class="btn btn-primary" type="submit" value="查询"/>
        </li>
        <li class="clearfix"></li>
    </ul>
</form:form>
<sys:message content="${message}"/>
<table id="contentTable" class="table table-striped table-bordered table-condensed">
    <thead>
    <tr>
        <th>技师姓名</th>
        <th>技师电话</th>        
        <%--<th>类别</th>--%>
        <th>美甲师技能等级</th>
        <th>美容师技能等级</th>
        <%--<th>技师技能</th>--%>
        <th>备注</th>
        <th>更新时间</th>
        <th>操作</th>
    </tr>
    </thead>
    <tbody>
    <c:forEach items="${page.list}" var="meibangUserSkillsType">
        <tr>
            <td>
                <a href="${ctx}/meibanguserskillstype/meibangUserSkillsType/form?id=${meibangUserSkillsType.id}">
                        ${meibangUserSkillsType.user.name}</a>
            </td>
            <td>
                    ${meibangUserSkillsType.user.phone}
            </td>            
                <%--<td>
                    <c:if test='${types.get("MJS") != meibangUserSkillsType.type}'>
                        美甲师
                    </c:if>
                    <c:if test='${types.get("MRS") != meibangUserSkillsType.type}'>
                        美容师
                    </c:if>
                </td>--%>
            <td>
                    ${fns:getValForList(mjsLevel, meibangUserSkillsType.level)}
            </td>
            <td>
                    ${fns:getValForList(mjsLevel, meibangUserSkillsType.level1)}
            </td>
                <%-- <td>

                         ${meibangUserSkillsType.skills}
                 </td>--%>
            <td>
                    ${meibangUserSkillsType.remark}
            </td>
            <td>
                <fmt:formatDate value="${meibangUserSkillsType.updateDate}"
                                pattern="yyyy-MM-dd HH:mm:ss"/>
            </td>
            <td>
                <a href="${ctx}/meibanguserskillstype/meibangUserSkillsType/form?id=${meibangUserSkillsType.id}">修改</a>
                <a href="${ctx}/meibanguserskillstype/meibangUserSkillsType/delete?id=${meibangUserSkillsType.id}"
                   onclick="return confirmx('确认要删除该技师技能类型吗？', this.href)">删除</a>
            </td>
        </tr>
    </c:forEach>
    </tbody>
</table>
<div class="pagination">${page}</div>
</body>
</html>